const cache = {
  namespaced: true,

  state: {
    cachePages: ['LayoutIndex']
  },

  mutations: {
    addCachePage (state, pageName) {
      if (!state.cachePages.includes(pageName)) {
        state.cachePages.push(pageName)
      }
    },
    removeCachePage (state, pageName) {
      const index = state.cachePages.indexof(pageName)
      if (index !== -1) {
        state.cachePages.splice(index, 1)
      }
    }
  },

  actions: {
  }
}
export default cache
